﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using TotalApplication.Core;
using TotalApplication.Mine_Video;
using TotalApplication.viewmodels.Video;

namespace TotalApplication.views.Video
{
    /// <summary>
    /// VideoTags.xaml 的交互逻辑
    /// </summary>
    public partial class VideoTags : Window
    {
        public VideoTags()
        {
            InitializeComponent();

            // 将参数放入容器，如此便全局可访问
            IoC.Get<TagsVM>().VideoTags = this;
            DataContext = IoC.Get<TagsVM>();
        }

        private void Window_Closed(object sender, EventArgs e)
        {
            VideoPathHelpers.SaveTags((TagsVM)DataContext);
        }

        private void Window_Deactivated(object sender, EventArgs e)
        {
            //((TagsVM)DataContext).ClosePopup();
        }
    }
}
